package sdstcom.lbq.one.lbq.uilts;

import android.content.Context;
import android.os.AsyncTask;

import sdstcom.lbq.one.lbq.uilts.HttpUtils;


/**
 * Created by Administrator on 2016/12/13 0013.
 */

public class Jsontask extends AsyncTask<String,Void,String>{

    private Context context;
    private CallBack cBack;

    public Jsontask(Context context, CallBack cBack) {
        this.context = context;
        this.cBack = cBack;
    }

    protected String doInBackground(String... params) {
        return HttpUtils.getJSONStr(params[0], new String[0]);
    }

    protected void onPostExecute(String result) {
        if(result != null) {
            this.cBack.sendStr(result);
        }
    }

    public interface CallBack {
        void sendStr(String var1);
    }
}
